import router from './router'
import {getUrlCode} from './utils/index'
// const whiteList = ['/login'] // 不重定向白名单

// 添加路由守卫
router.beforeEach((to, from, next) => {
  let token = getUrlCode('token')
  if (token) {
    console.log(window)
    let url = window.location.origin
    window.location.href = url
  } else {
    next()
  }
})
